package one.stand.util;

import com.github.wxpay.sdk.WXPayConfig;
import lombok.Data;

import java.io.ByteArrayInputStream;
import java.io.InputStream;

/**
 * @author Administrator
 */
@Data
public class WxConfig implements WXPayConfig {

    private Integer accountId;

    private String appId;

    private byte[] certData;

    private int httpConnectTimeoutMs;

    private int httpReadTimeoutMs;

    private String key;

    private String mchId;

    private String notifyUrl;

    private String refundUrl;


    @Override
    public String getAppID() {
        return appId;
    }

    @Override
    public String getMchID() {
        return mchId;
    }

    @Override
    public String getKey() {
        return key;
    }

    @Override
    public InputStream getCertStream() {
        return new ByteArrayInputStream(this.certData);
    }

    @Override
    public int getHttpConnectTimeoutMs() {
        return httpConnectTimeoutMs;
    }

    @Override
    public int getHttpReadTimeoutMs() {
        return httpReadTimeoutMs;
    }
}
